package cn.lijiajia3515.cairo.auth.modules.role;

import cn.lijiajia3515.cairo.core.extension.Extension;

import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;

import static cn.lijiajia3515.cairo.auth.modules.role.RoleField.NAME;
import static cn.lijiajia3515.cairo.auth.modules.role.RoleField.REMARK;

public enum RoleExtension implements Extension<RoleField> {
	BASIC(NAME),
	INFO(NAME, REMARK),
	ALL(RoleField.values());
	private final Set<RoleField> fields;

	RoleExtension(RoleField... fields) {
		this.fields = Arrays.stream(fields).collect(Collectors.toSet());
	}

	@Override
	public Set<RoleField> fields() {
		return fields;
	}
}
